package cn.bdqn.repository;

import cn.bdqn.pojo.ChatRoom;
import cn.bdqn.vo.UserChatRoom;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface Asect_ChatRoomRepository extends JpaRepository<ChatRoom,Integer> {

    @Query("select new cn.bdqn.vo.UserChatRoom(u,p) from User u,Project p where u.id=p.userId and p.mywrokbench_id = 0")
    List<UserChatRoom> getPro();
}
